QT       += core gui
QT       += multimedia

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

# 头文件查找路径
INCLUDEPATH += \
    user/qt_player \
    lib/qt_ui \
    lib/multimedia_session \
    drivers/audio_input \
    drivers/audio_output \
    drivers/video_input \
    drivers/video_output

# 添加ffmpeg库的头文件路径
INCLUDEPATH += $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/include

# 源文件
SOURCES += \
    drivers/audio_input/audioinput.cpp \
    drivers/audio_output/audiooutput.cpp \
    drivers/video_input/videoinput.cpp \
    drivers/video_output/videooutput.cpp \
    lib/multimedia_session/module_audiodec.c \
    lib/multimedia_session/module_audioenc.c \
    lib/multimedia_session/module_avsync.c \
    lib/multimedia_session/module_mkvdemux.c \
    lib/multimedia_session/module_mp4demux.c \
    lib/multimedia_session/module_mp4mux.c \
    lib/multimedia_session/module_videodec.c \
    lib/multimedia_session/module_videoenc.c \
    lib/multimedia_session/module_yuvin.c \
    lib/multimedia_session/module_pcmin.c \
    lib/multimedia_session/module_filesave.c \
    user/qt_player/main.cpp \
    lib/qt_ui/mainwindow.cpp \
    user/qt_player/player.c

# 头文件
HEADERS += \
    drivers/audio_input/audioinput.h \
    drivers/audio_output/audiooutput.h \
    drivers/video_input/videoinput.h \
    drivers/video_output/videooutput.h \
    lib/multimedia_session/module.h \
    lib/multimedia_session/module_pcmin.h \
    lib/multimedia_session/module_yuvin.h \
    lib/qt_ui/mainwindow.h \
    user/qt_player/player.h

# 添加ffmpeg库文件索引的路径
LIBS += $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/avcodec.lib\
        $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/avdevice.lib\
        $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/avfilter.lib\
        $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/avformat.lib\
        $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/avutil.lib\
        $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/postproc.lib\
        $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/swresample.lib\
        $$PWD/../006_AudioVideo_Codec_ffmpeg/ffmpeg-4.3.1-win64-dev/lib/swscale.lib

# UI界面
FORMS += \
    lib/qt_ui/mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
